import request from '@/utils/request'

// 登录
export function login(params) {
  return request({
    url: '/login',
    method: 'GET',
    params
  })
}

// 获取验证码
export function getCaptcha() {
  return request({
    url: '/captcha',
    method: 'GET'
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 注册
export function registeref(data) {
  return request({
    method: 'POST',
    url: '/login',
    data
  })
}
